import React from "react";
import ReactDom from "react-dom";
import { renderRoutes } from "react-router-config";
import { BrowserRouter, Switch } from "react-router-dom";

import { createClientStore } from "../src/store/store";
import { Provider } from "react-redux";
import routes from "../src/routers/Routers";
const App = () => {
  return (
    <Provider store={createClientStore()}>
      <BrowserRouter>
        <Switch>{renderRoutes(routes)}</Switch>
      </BrowserRouter>
    </Provider>
  );
};

ReactDom.hydrate(<App />, document.getElementById("root")); //注水
